package com.qf.xiaom.pojo;

import java.util.List;

public class PageBean <T>{
    private int currenPage;//当前页码
    private int totalPage;//总页数
    private List<T>list;
    private int pageSize=2;//每页的条数
    private  long totalSize;//总条数

    public int getCurrenPage() {
        return currenPage;
    }

    public void setCurrenPage(int currenPage) {
        this.currenPage = currenPage;
    }

    public int getTotalPage() {
        totalPage=(int)((totalSize-1+pageSize)/pageSize);
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(long totalSize) {
        this.totalSize = totalSize;
    }
}
